<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<body>
<div class="nav">
    <ul>
        <li>薪资管理</li>
        <li>/</li>
        <li>添加薪资</li>
    </ul>
</div>
<div id="box">
    <form id="box1">
        <p>职位：<input id="position" name="position" type="text"></p>
        <p>薪资：<input id="salaryDesc" name="salaryDesc" type="text"></p>
        <div class="btn-box">
            <input onclick="add()" type="button" value="添加">
            <input type="button" value="重置">
        </div>
    </form>
</div>
<script type="text/javascript">
    function add() {
        var salaryDesc = $("#salaryDesc").val();
        var position = $("#position").val()
        $.get("/web/salary", {op: "save", salaryDesc: salaryDesc, position: position}, function (data) {
            alert(data);
        });
    }
</script>
</body>
</html>